{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans 'Submit Proposal' %}{% endblock %}
{% block content %}
<div class="row">
    <div class="col-md-12">
        <h1>Calls for Proposals</h1>
        <p>
            LCO's year is divided into two observing semesters, each 6 months long. Calls for proposals are issued each semester. Three types of proposals can be submitted through this LCO Observing Portal:
        </p>
        <ul>
          <li><b>Standard proposals</b> are accepted each semester from astronomers affiliated with LCO and LCO's non-guaranteed-time partners:
                 UCSB, U. Colorado, IAC, and IPAC at Caltech. Standard proposals should only be submitted through this portal from PIs affiliated with
                 one of these institutions. Other Science Collaboration institutions allocate their shares of time according to their own TAC procedures
                 and do not use this portal to collect proposals.</li> 
          <li><b>Key Project proposals</b> are accepted annually from astronomers affiliated with LCO's Science Collaboration partners
                 (guaranteed and non-guaranteed-time). Key project proposals <b>should</b> be submitted through this portal. 
                 Key project proposals are reviewed by the <a href="https://lco.global/science/proposals/TAC/">LCO TAC</a>.</li>
          <li><b>Director's Discretionary Time (DDT) proposals</b> are accepted at any time from astronomers affiliated with LCO's Science Collaboration institutions.
                 DDT proposals <b>should</b> be submitted through this portal. DDT proposals are reviewed by LCO's director. </li>
        </ul>
        <p>
            Please refer to the LCO website for more information on the <a href="https://lco.global/observatory/proposal/process/">time allocation process.</a>
        </p>
        <p>
            If you are composing a proposal for the LCO network for the first time, we recommend that you consult our <a href="https://lco.global/observatory/proposal/guidelines/">guidelines for writing proposals,</a> as well as the <a href="https://lco.global/files/User_Documentation/gettingstartedonthelcogtnetwork_30jan17.pdf">"Getting Started" Guide.</a>
            Information about the <a href="http://lcogt.net/observatory/telescopes">telescopes</a>, <a href="http://lcogt.net/observatory/instruments">instruments</a>,
            <a href="http://lcogt.net/observatory/data">data handling and quality</a>, <a href="http://lcogt.net/observatory/scheduling">scheduling</a>
            and other technical aspects of the network is available on the <a href="http://lcogt.net/observatory/capabilities">observatory capabilities</a> pages.
        </p>

        <table class="table">
            <thead>
                <tr><td>Type</td><td>Semester</td><td>Eligibility</td><td>Deadline</td><td></td></tr>
            </thead>
            <tbody>
                {% for call in calls %}
                <tr>
                    <td>{{ call.get_proposal_type_display }}</td>
                    <td>{{ call.semester }}</td>
                    <td>{{ call.eligibility_short }}</td>
                    <td>{% if call.proposal_type == 'DDT' %} N/A {% else %}{{ call.deadline }}{% endif %}</td>
                    <td><a href="{% url 'sciapplications:create' call=call.id %}" class="btn btn-primary">Apply</a></td>
                </tr>
                {% empty %}
                <tr><td colspan="5">No active calls at this time</td></tr>
                {% endfor %}
            </tbody>
        </table>
        <h1>Your Proposals</h1>
        <p>
            Below is a list of your draft proposals and submitted proposals in LCO's database. Standard and Key Project proposals are reviewed by a
            <a href="https://lco.global/science/proposals/TAC/">Time Allocation Committee (TAC)</a> whose members are selected from the astronomical community and
            are not affiliated with LCO. Proposals recommended for scheduling by the TAC are awarded time by LCO's director.
            PIs are notified of a standard proposal's acceptance approximately 3 weeks before the start of the semester.
            Proposals for discretionary time are reviewed by LCO's director only. Notices of acceptance are issued as quickly as possible, but typically in less than one week.
        </p>
        <h4>Draft Proposals</h4>
        <table class="table">
            <thead>
                <tr>
                    <td>{% trans 'Title' %}</td>
                    <td>{% trans 'Call' %}</td>
                    <td>{% trans 'Deadline' %}</td>
                    <td>{% trans 'Status' %}</td>
                    <td>{% trans 'Preview' %}</td>
                    <td>{% trans 'Delete' %}</td>
                </tr>
            </thead>
            <tbody>
                {% for app in draft_proposals %}
                <tr>
                    <td><a href="{% url 'sciapplications:update' pk=app.id %}">{{ app.title }}</a></td>
                    <td>{{ app.call }}</td>
                    <td>{% if app.call.proposal_type == 'DDT' %} N/A {% else %}{{ app.call.deadline }}{% endif %}</td>
                    <td>{{ app.status }}</td>
                    <td>
                        <a href="{% url 'sciapplications:detail' pk=app.id %}"><i class="fa fa-print"></i></a>
                        <a href="{% url 'sciapplications:pdf' pk=app.id %}"><i class="fa fa-file-pdf-o"></i></a>
                    </td>
                    <td><a href="{% url 'sciapplications:delete' pk=app.id %}" class="fa fa-trash" title="Delete draft"></a></td>
                </tr>
                {% empty %}
                <tr><td colspan=5>{% trans 'You have not started any proposals.' %}</td></tr>
                {% endfor %}
            </tbody>
        </table>
        <h4>Submitted Proposals</h4>
        <table class="table">
            <thead>
                <tr>
                    <td>{% trans 'Title' %}</td>
                    <td>{% trans 'Call' %}</td>
                    <td>{% trans 'Deadline' %}</td>
                    <td>{% trans 'Status' %}</td>
                    <td>{% trans 'View' %}</td>
                </tr>
            </thead>
            <tbody>
                {% for app in submitted_proposals %}
                <tr>
                    <td>{{ app.title }}</td>
                    <td>{{ app.call }}</td>
                    <td>{% if app.call.proposal_type == 'DDT' %} N/A {% else %}{{ app.call.deadline }}{% endif %}</td>
                    <td>{{ app.status }}</td>
                    <td>
                        <a href="{% url 'sciapplications:detail' pk=app.id %}"><i class="fa fa-print"></i></a>
                        <a href="{% url 'sciapplications:pdf' pk=app.id %}"><i class="fa fa-file-pdf-o"></i></a>
                    </td>
                </tr>
                {% empty %}
                <td colspan="5">{% trans 'You have not submitted any proposals.' %}</td>
                {% endfor %}
            </tbody>
        </table>
    </div>
</div>

{% endblock %}
